<template>
	<view class="workCard" >
		<view class="card-item"  @click='humanDetail(item)' v-for="item in list" :key="item.id">
			<view class="jcl">
				<image :src="item.headImage" mode=""></image>
			</view>
			<view class="jcc">
				<view class="name">{{item.realName}}</view>
				<view class="tags">{{item.age}}|{{item.gender}}|{{getWork(item.workExperienceTime)}}|{{getEdu(item.education)}}</view>
				<view class="need">想找{{item.areaName}}|{{item.position}}|{{item.comprehensiveSalaryType==0?'面议':item.comprehensiveSalaryStart + '-'+item.comprehensiveSalaryEnd}}</view>
			</view>
			<view class="jcr">
				<view class="jcrBtn" @click="toCallBtn(item)">打招呼</view>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import {
		useRouter
	} from 'uni-mini-router'
	import {getEdu,getWork,getAge} from '@/utlis/common.js'
	let props = defineProps({
		list:{
			type: Array, // 类型
			default:()=>[]// 默认值
		},
		showcompnay:{
			type: Boolean, // 类型
			default: true // 默认值
		},
		jobId:{
			type:String,
			default:''
		}
	})
	// let emits = defineEmits(['toCall'])
	const toCallBtn = (item)=>{
		// 跳转去IM系统
		// emits('toCall',item)
	}
	const router = useRouter()
	const humanDetail = (item) => {
		console.log(9999)
		router.push({
			name: 'workerDetail',
			params: {
				id:item.id,
				jobId:props.jobId
			}
		})
	}
	

</script>

<style lang="scss" scoped>
	.workCard {
		height:100%;
		padding:0 24rpx;
		width:100%;
		box-sizing: border-box;
		overflow-y: auto;
		
		.card-item{
			height: 204rpx;
			width:100%;
			overflow: hidden;
			margin: 30rpx auto;
			padding: 30rpx 30rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			background:#fff;
			border-radius: 24rpx;
			box-shadow: 8rpx 8rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
		}

		.jcl {
			// width: 90rpx;
			
			height: 100%;
			width:100rpx;

			image {
				width: 80rpx;
				height: 80rpx;
				border-radius: 16rpx;
			}
		}

		.jcc {
			flex:1;
			height: 100%;
			display:flex;
			flex-direction: column;
			justify-content: space-between;
			padding-right:10rpx;

			.name {
				font-size: 32rpx;
				color:#000000FF;
				font-weight:600;
			}

			.tags {
				font-size: 24rpx;
				margin: 10rpx 0;
				color:#00000073;
			}

			.need {
				font-size: 24rpx;
			}
		}

		.jcr {
			// width: 140rpx;
			height: 100%;
			width: 150rpx;
			.jcrBtn {
				width: 140rpx;
				height: 60rpx;
				line-height: 60rpx;
				background-color: #CB645E;
				border-radius: 10rpx;
				text-align: center;
				font-size: 26rpx;
				color:#fff;
			}
		}
	}
</style>